package com.animal.service.impl;

import com.animal.entity.dto.AdoptDto;
import com.animal.entity.pojo.AAdopt;
import com.animal.mapper.AdoptMapper;
import com.animal.service.AdoptService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;


@Service
public class AdoptServiceImpl implements AdoptService {
    @Resource
    private AdoptMapper adopttMapper;


    @Override
    public boolean addAdopttAll(AAdopt adopt) {
        int count = adopttMapper.addAdopttAll(adopt);
        if (count > 0) {
            return true;
        } else {
            return false;
        }
    }

    @Override
    public List<AdoptDto> getInfo(Integer apply) {
        return adopttMapper.getInfo(apply);
    }

    @Override
    public boolean applyProcess(AAdopt aAdopt) {
        int i = adopttMapper.applyProcess(aAdopt);
        if (i>0) {
            return true;
        }else {
            return false;
        }
    }
}
